package com.ss.android.crash.log;

import android.annotation.TargetApi;
import android.os.Build;
import android.os.Debug;

public final class p {
    private static a a;

    static {
        p.a = Build.VERSION.SDK_INT >= 19 ? new b((byte) 0) : new a((byte) 0);
    }

    public static int a(Debug.MemoryInfo arg1) {
        return p.a.a(arg1);
    }

    public static int b(Debug.MemoryInfo arg1) {
        return p.a.b(arg1);
    }

    public static int c(Debug.MemoryInfo arg1) {
        return p.a.c(arg1);
    }

    static class a {
        a(byte arg1) {
            this();
        }

        private a() {

        }

        public int a(Debug.MemoryInfo arg2) {
            return -1;
        }

        public int b(Debug.MemoryInfo arg2) {
            return -1;
        }

        public int c(Debug.MemoryInfo arg2) {
            return -1;
        }
    }

    @TargetApi(value = 19)
    static final class b extends a {
        b(byte arg1) {
            this();
        }

        private b() {
            super((byte) 0);
        }

        public final int a(Debug.MemoryInfo arg2) {
            return arg2.getTotalPrivateClean();
        }

        public final int b(Debug.MemoryInfo arg2) {
            return arg2.getTotalSharedClean();
        }

        public final int c(Debug.MemoryInfo arg2) {
            return arg2.getTotalSwappablePss();
        }
    }
}

